﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1.0" name="viewport" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <!-- BEGIN GLOBAL MANDATORY STYLES -->
    <link href="/assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <!-- END GLOBAL MANDATORY STYLES -->
    @RenderSection("header", false)
    <!-- BEGIN THEME STYLES -->
    <link href="/assets/global/css/components.css" id="style_components" rel="stylesheet" type="text/css" />
   
    <link href="/assets/admin/layout/css/custom.css" rel="stylesheet" type="text/css" />
    <!-- END THEME STYLES -->
    <link rel="shortcut icon" href="favicon.ico" />
</head>
<body style="background-color:#fff; margin:0!important; padding:10px!important; overflow-x:hidden">

    <div class="portlet">
        <div class="portlet-title">
            <div class="caption" style=" font-weight:bold">
                @ViewBag.Title
            </div>
            <div class="actions"></div>
        </div>
        <div class="portlet-body">
            <div class="table-container">
                <div class="alert alert-info alert-dismissable hide">
                    <strong>提示!</strong>
                    <span></span>！
                </div>
                @using (Ajax.BeginForm(null, null, new AjaxOptions() { LoadingElementId = "",  HttpMethod="post", OnBegin= "onBegin", OnComplete= "onComplete",OnSuccess= "onSuccess"}, new { id = "mainForm", @class = "form-inline" }))
                {
                    <div class="form-body offset1"  style=" padding-left:25px;">
                        <div class="portlet-body form-horizontal form-bordered form-row-stripped">
                            <div class="row-fluid">
                                @RenderBody()
                            </div>
                        </div>

                        <div class="form-actions navbar-fixed-bottom" style=" padding:10px 20px; background-color:#f2f2f2;">
                            <button  type="submit" id="submit" class="btn blue "><i class="fa fa-arrow-right"></i> 提交</button>
                            <span id="submitloading" style="display:none;"><img src="/content/images/loading.gif" /></span>
                            <button type="button" class="btn" id="cancel" onclick="parent.jQuery.fancybox.close()">关闭</button>
                        </div>
                    </div>
                }
             
            </div>
        </div>
    </div>

    @Scripts.Render("~/bundles/jquery", "~/bundles/jqueryajax", "~/bundles/jqueryval")
   <script type="text/javascript">
       function onBegin() {
           $("#submitloading").show();
           $("#submit").attr("disabled", "disabled")
       }
       function onComplete() {
           $("#submitloading").hide();
       }

       function onSuccess(data) {
           $("#alert > span").html(data.msg).show();
           if (data.suc) {
               parent.location.reload();
               parent.jQuery.fancybox.close();
           }
       }
   </script>
    @RenderSection("footer",false)
</body>
</html>

